@extends('home.layout')
@section('content')
<!-- ngView:  -->
<div class="ng-scope" ng-view="" role="main">
    <div profile-container="" page-title="个人资料" page-name="info" class="profile-container container">
        <div class="clearfix">
            <div location="" class="location" ng-style="{visibility: geohash ? '' : 'hidden'}" role="navigation"><span>当前位置:</span>
                <ul
                            class="dropbox location-dropbox" ubt-visit="398"><li class="arrow"></li>
                        <!-- ngRepeat: userPlace in userPlaces | filter:filterPlace | limitTo: 4 --><li class="ng-scope" href="{{asset('')}}place/wx4spk28vey" class="inherit ng-binding" ng-href="/place/wx4spk28vey" ng-bind="userPlace.name" ubt-click="399">昌平区沙河北京华文学院附近</a></li>
                        <!-- end ngRepeat: userPlace in userPlaces | filter:filterPlace | limitTo: 4 --><li class="changelocation"><a href="{{asset('')}}home" ng-href="/home" hardjump="">修改收货地址<span class="icon-location"></span></a></li></ul></span> <span ng-transclude=""><i class="icon-arrow-right ng-scope"></i>
                        <span class="ng-binding ng-scope">个人资料</span></span>
            </div>
            <div search-input=""></div>
        </div>
        <ul profile-sidebar="" class="profile-sidebar" role="navigation">
            <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"ng-class="{ active: pageName === 'profile' }"><i class="icon-line-home"></i><a href="{{asset('')}}profile">个人中心</a></h2></li>
            <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"><i class="icon-line-order"></i>我的订单
                </h2>
                <ul>
                    <li ng-class="{ active: pageName === 'order' }"><a
                                href="{{asset('')}}profile/order">近三个月订单</a></li>
                    <li ng-class="{ active: pageName === 'order-unrated' }"><a
                                href="{{asset('')}}profile/order/unrated">待评价订单<!-- ngIf: unratedNumber --></a>
                    </li>
                </ul>
            </li>
            <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"><i
                            class="icon-line-profile"></i>我的资料</h2>
                <ul>
                    <li class="active" ng-class="{ active: pageName === 'info' }"><a href="#">个人资料</a></li>
                    <li ng-class="{ active: pageName === 'address' }"><a
                                href="{{asset('')}}profile/address">地址管理</a></li>
                    <li ng-class="{ active: pageName === 'changepassword' }"><a
                                href="{{asset('')}}profile/security/changepassword">修改密码</a></li>
                </ul>
            </li>
            <li class="profile-sidebar-section"><h2 class="profile-sidebar-sectiontitle"
                                                    ng-class="{ active: pageName === 'favor' }"><a
                            href="{{asset('')}}profile/favor"><i class="icon-order-favor"></i>我的收藏</a></h2></li>
        </ul>
        <div class="profile-panel" role="main"><!-- ngIf: pageTitleVisible --><h3 ng-if="pageTitleVisible" class="profile-paneltitle ng-scope"> <span class="ng-binding" ng-bind="pageTitle">个人资料</span> <span class="subtitle ng-binding"
        ng-bind-html="pageSubtitle | toTrusted"></span>
        </h3>





        <!-- 从这里开始 -->

        <form id="myform" action="{{url('profile/doinfo')}}" method="post" enctype = "multipart/form-data">
        {{csrf_field()}}
        <!-- end ngIf: pageTitleVisible -->
        <div class="profile-panelcontent" ng-transclude="">
            <div class="profileinfo ng-scope">
            
            @if(count($errors) > 0)
                    <div class="profile-panelcontent" ng-transclude="" style="margin-bottom:20px;border:1px solid yellow; width:300px;">
                                <h4>温馨提示!</h4>
                                <ul>
                                    @foreach($errors -> all() as $error)
                                        <li><font color="red">{{$error}}</font></li>
                                    @endforeach
                                </ul>
                    </div>
            @endif
            @if(session('info'))
                    <!-- <div class="profile-panelcontent" ng-transclude="" style="margin-bottom:20px;border:1px solid yellow; width:300px;">
                                <h4>温馨提示!</h4>
                                <ul>
                                        <li><font color="red">{{session('info')}}</font></li>
                                    
                                </ul>
                    </div> -->
                    <script type="text/javascript">alert("{{session('info')}}");</script>
            @endif
                <p class="profileinfo-item">
                    <span class="profileinfo-label">编辑头像</span>
                        <span class="profileinfo-face">
                            
                            <img src="{{session('master') -> image}}" alt="鱼丸粗面0sui">

                            <input type="file" name="image"  />
                        </span>
                </p><br/>
                
                    <p class="profileinfo-item">
                        <span class="profileinfo-label">用户名</span> 
                        <span>
                            <input type="text" name="username" class="profileinfo-value ng-binding" ng-bind="user.username" value="{{session('master') -> username}}"/>
            <!-- ngIf: user.is_auto_generated.username -->
                           
            <!-- end ngIf: user.is_auto_generated.username -->
                        </span>
                    </p>
                    <p class="profileinfo-item">
                    <span class="profileinfo-label">手机号</span>
        <!-- ngIf: user.is_email_valid --> 
        <!-- ngIf: !user.is_email_valid -->
                <input type="text" name="phone" class="profileinfo-value ng-binding" ng-bind="user.email"value="{{session('master') -> phone}}"/>
                </p>
                <p>
                    <span class="profileinfo-label">邮箱</span>
                    <input type="text" name="email" class="profileinfo-value ng-binding" ng-bind="user.email"value="{{session('master') -> email}}"/>
        <!-- end ngIf: !user.is_email_valid -->
                </p>
                <input type="hidden" name="id" value="{{session('master') -> id}}"/>
                <button type="submit" style="margin-top:50px;">确定修改</button>
                </div>
            </div>

            </form>

        </div>
    </div>
</div>

@endsection